package com.igeek.compus.study.service;

import com.igeek.compus.study.dao.UserDao;
import com.igeek.compus.study.entity.User;

public class UserService  {

    private UserDao userDao = new UserDao();

    public User login(String username , String password) throws Exception{
        userDao.userInfo(username,password);
        return userDao.userInfo(username,password);
    }

    public boolean register(User user)throws Exception{
        userDao.addUser(user);
        return userDao.addUser(user)>0;
    }
}
